using Google.ProtocolBuffers;
using Google.ProtocolBuffers.Collections;
using micromsg.Proto;
using System;
using System.CodeDom.Compiler;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Runtime.CompilerServices;
namespace micromsg
{
	[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
	public sealed class BuiltinIPList : GeneratedMessageLite<BuiltinIPList, BuiltinIPList.Builder>
	{
		[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
		public sealed class Builder : GeneratedBuilderLite<BuiltinIPList, BuiltinIPList.Builder>
		{
			private bool resultIsReadOnly;
			private BuiltinIPList result;
			protected override BuiltinIPList.Builder ThisBuilder
			{
				get
				{
					return this;
				}
			}
			public override bool IsInitialized
			{
				get
				{
					return this.result.IsInitialized;
				}
			}
			protected override BuiltinIPList MessageBeingBuilt
			{
				get
				{
					return this.PrepareBuilder();
				}
			}
			public override BuiltinIPList DefaultInstanceForType
			{
				get
				{
					return BuiltinIPList.DefaultInstance;
				}
			}
			public uint LongConnectIPCount
			{
				get
				{
					return this.result.LongConnectIPCount;
				}
				set
				{
					this.SetLongConnectIPCount(value);
				}
			}
			public uint ShortConnectIPCount
			{
				get
				{
					return this.result.ShortConnectIPCount;
				}
				set
				{
					this.SetShortConnectIPCount(value);
				}
			}
			public uint Seq
			{
				get
				{
					return this.result.Seq;
				}
				set
				{
					this.SetSeq(value);
				}
			}
			public IPopsicleList<BuiltinIP> LongConnectIPListList
			{
				get
				{
					return this.PrepareBuilder().longConnectIPList_;
				}
			}
			public int LongConnectIPListCount
			{
				get
				{
					return this.result.LongConnectIPListCount;
				}
			}
			public IPopsicleList<BuiltinIP> ShortConnectIPListList
			{
				get
				{
					return this.PrepareBuilder().shortConnectIPList_;
				}
			}
			public int ShortConnectIPListCount
			{
				get
				{
					return this.result.ShortConnectIPListCount;
				}
			}
			public Builder()
			{
				this.result = BuiltinIPList.DefaultInstance;
				this.resultIsReadOnly = true;
			}
			internal Builder(BuiltinIPList cloneFrom)
			{
				this.result = cloneFrom;
				this.resultIsReadOnly = true;
			}
			private BuiltinIPList PrepareBuilder()
			{
				if (this.resultIsReadOnly)
				{
					BuiltinIPList other = this.result;
					this.result = new BuiltinIPList();
					this.resultIsReadOnly = false;
					this.MergeFrom(other);
				}
				return this.result;
			}
			public override BuiltinIPList.Builder Clear()
			{
				this.result = BuiltinIPList.DefaultInstance;
				this.resultIsReadOnly = true;
				return this;
			}
			public override BuiltinIPList.Builder Clone()
			{
				if (this.resultIsReadOnly)
				{
					return new BuiltinIPList.Builder(this.result);
				}
				return new BuiltinIPList.Builder().MergeFrom(this.result);
			}
			public override BuiltinIPList BuildPartial()
			{
				if (this.resultIsReadOnly)
				{
					return this.result;
				}
				this.resultIsReadOnly = true;
				return this.result.MakeReadOnly();
			}
			public override BuiltinIPList.Builder MergeFrom(IMessageLite other)
			{
				if (other is BuiltinIPList)
				{
					return this.MergeFrom((BuiltinIPList)other);
				}
				base.MergeFrom(other);
				return this;
			}
			public override BuiltinIPList.Builder MergeFrom(BuiltinIPList other)
			{
				return this;
			}
			public override BuiltinIPList.Builder MergeFrom(ICodedInputStream input)
			{
				return this.MergeFrom(input, ExtensionRegistry.Empty);
			}
			public override BuiltinIPList.Builder MergeFrom(ICodedInputStream input, ExtensionRegistry extensionRegistry)
			{
				this.PrepareBuilder();
				uint num;
				string text;
				while (input.ReadTag(out num, out text))
				{
					if (num == 0u && text != null)
					{
						int num2 = Array.BinarySearch<string>(BuiltinIPList._builtinIPListFieldNames, text, StringComparer.get_Ordinal());
						if (num2 < 0)
						{
							this.ParseUnknownField(input, extensionRegistry, num, text);
							continue;
						}
						num = BuiltinIPList._builtinIPListFieldTags[num2];
					}
					uint num3 = num;
					if (num3 <= 16u)
					{
						if (num3 == 0u)
						{
							throw InvalidProtocolBufferException.InvalidTag();
						}
						if (num3 == 8u)
						{
							this.result.hasLongConnectIPCount = input.ReadUInt32(ref this.result.longConnectIPCount_);
							continue;
						}
						if (num3 == 16u)
						{
							this.result.hasShortConnectIPCount = input.ReadUInt32(ref this.result.shortConnectIPCount_);
							continue;
						}
					}
					else
					{
						if (num3 == 26u)
						{
							input.ReadMessageArray<BuiltinIP>(num, text, this.result.longConnectIPList_, BuiltinIP.DefaultInstance, extensionRegistry);
							continue;
						}
						if (num3 == 34u)
						{
							input.ReadMessageArray<BuiltinIP>(num, text, this.result.shortConnectIPList_, BuiltinIP.DefaultInstance, extensionRegistry);
							continue;
						}
						if (num3 == 40u)
						{
							this.result.hasSeq = input.ReadUInt32(ref this.result.seq_);
							continue;
						}
					}
					if (WireFormat.IsEndGroupTag(num))
					{
						return this;
					}
					this.ParseUnknownField(input, extensionRegistry, num, text);
				}
				return this;
			}
			public BuiltinIPList.Builder SetLongConnectIPCount(uint value)
			{
				this.PrepareBuilder();
				this.result.hasLongConnectIPCount = true;
				this.result.longConnectIPCount_ = value;
				return this;
			}
			public BuiltinIPList.Builder ClearLongConnectIPCount()
			{
				this.PrepareBuilder();
				this.result.hasLongConnectIPCount = false;
				this.result.longConnectIPCount_ = 0u;
				return this;
			}
			public BuiltinIPList.Builder SetShortConnectIPCount(uint value)
			{
				this.PrepareBuilder();
				this.result.hasShortConnectIPCount = true;
				this.result.shortConnectIPCount_ = value;
				return this;
			}
			public BuiltinIPList.Builder ClearShortConnectIPCount()
			{
				this.PrepareBuilder();
				this.result.hasShortConnectIPCount = false;
				this.result.shortConnectIPCount_ = 0u;
				return this;
			}
			public BuiltinIPList.Builder SetSeq(uint value)
			{
				this.PrepareBuilder();
				this.result.hasSeq = true;
				this.result.seq_ = value;
				return this;
			}
			public BuiltinIPList.Builder ClearSeq()
			{
				this.PrepareBuilder();
				this.result.hasSeq = false;
				this.result.seq_ = 0u;
				return this;
			}
			public BuiltinIP GetLongConnectIPList(int index)
			{
				return this.result.GetLongConnectIPList(index);
			}
			public BuiltinIPList.Builder SetLongConnectIPList(int index, BuiltinIP value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.longConnectIPList_[index] = value;
				return this;
			}
			public BuiltinIPList.Builder SetLongConnectIPList(int index, BuiltinIP.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.longConnectIPList_[index] = builderForValue.Build();
				return this;
			}
			public BuiltinIPList.Builder AddLongConnectIPList(BuiltinIP value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.longConnectIPList_.Add(value);
				return this;
			}
			public BuiltinIPList.Builder AddLongConnectIPList(BuiltinIP.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.longConnectIPList_.Add(builderForValue.Build());
				return this;
			}
			public BuiltinIPList.Builder AddRangeLongConnectIPList(IEnumerable<BuiltinIP> values)
			{
				this.PrepareBuilder();
				this.result.longConnectIPList_.Add(values);
				return this;
			}
			public BuiltinIPList.Builder ClearLongConnectIPList()
			{
				this.PrepareBuilder();
				this.result.longConnectIPList_.Clear();
				return this;
			}
			public BuiltinIP GetShortConnectIPList(int index)
			{
				return this.result.GetShortConnectIPList(index);
			}
			public BuiltinIPList.Builder SetShortConnectIPList(int index, BuiltinIP value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.shortConnectIPList_[index] = value;
				return this;
			}
			public BuiltinIPList.Builder SetShortConnectIPList(int index, BuiltinIP.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.shortConnectIPList_[index] = builderForValue.Build();
				return this;
			}
			public BuiltinIPList.Builder AddShortConnectIPList(BuiltinIP value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.shortConnectIPList_.Add(value);
				return this;
			}
			public BuiltinIPList.Builder AddShortConnectIPList(BuiltinIP.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.shortConnectIPList_.Add(builderForValue.Build());
				return this;
			}
			public BuiltinIPList.Builder AddRangeShortConnectIPList(IEnumerable<BuiltinIP> values)
			{
				this.PrepareBuilder();
				this.result.shortConnectIPList_.Add(values);
				return this;
			}
			public BuiltinIPList.Builder ClearShortConnectIPList()
			{
				this.PrepareBuilder();
				this.result.shortConnectIPList_.Clear();
				return this;
			}
		}
		public const int LongConnectIPCountFieldNumber = 1;
		public const int ShortConnectIPCountFieldNumber = 2;
		public const int SeqFieldNumber = 5;
		public const int LongConnectIPListFieldNumber = 3;
		public const int ShortConnectIPListFieldNumber = 4;
		private static readonly BuiltinIPList defaultInstance;
		private static readonly string[] _builtinIPListFieldNames;
		private static readonly uint[] _builtinIPListFieldTags;
		private bool hasLongConnectIPCount;
		private uint longConnectIPCount_;
		private bool hasShortConnectIPCount;
		private uint shortConnectIPCount_;
		private bool hasSeq;
		private uint seq_;
		private PopsicleList<BuiltinIP> longConnectIPList_ = new PopsicleList<BuiltinIP>();
		private PopsicleList<BuiltinIP> shortConnectIPList_ = new PopsicleList<BuiltinIP>();
		private int memoizedSerializedSize = -1;
		public static BuiltinIPList DefaultInstance
		{
			get
			{
				return BuiltinIPList.defaultInstance;
			}
		}
		public override BuiltinIPList DefaultInstanceForType
		{
			get
			{
				return BuiltinIPList.DefaultInstance;
			}
		}
		protected override BuiltinIPList ThisMessage
		{
			get
			{
				return this;
			}
		}
		public uint LongConnectIPCount
		{
			get
			{
				return this.longConnectIPCount_;
			}
		}
		public uint ShortConnectIPCount
		{
			get
			{
				return this.shortConnectIPCount_;
			}
		}
		public uint Seq
		{
			get
			{
				return this.seq_;
			}
		}
		public IList<BuiltinIP> LongConnectIPListList
		{
			get
			{
				return this.longConnectIPList_;
			}
		}
		public int LongConnectIPListCount
		{
			get
			{
				return this.longConnectIPList_.Count;
			}
		}
		public IList<BuiltinIP> ShortConnectIPListList
		{
			get
			{
				return this.shortConnectIPList_;
			}
		}
		public int ShortConnectIPListCount
		{
			get
			{
				return this.shortConnectIPList_.Count;
			}
		}
		public override bool IsInitialized
		{
			get
			{
				if (!this.hasLongConnectIPCount)
				{
					return false;
				}
				if (!this.hasShortConnectIPCount)
				{
					return false;
				}
				if (!this.hasSeq)
				{
					return false;
				}
				using (IEnumerator<BuiltinIP> enumerator = this.LongConnectIPListList.GetEnumerator())
				{
					while (enumerator.MoveNext())
					{
						BuiltinIP current = enumerator.get_Current();
						if (!current.IsInitialized)
						{
							bool result = false;
							return result;
						}
					}
				}
				using (IEnumerator<BuiltinIP> enumerator2 = this.ShortConnectIPListList.GetEnumerator())
				{
					while (enumerator2.MoveNext())
					{
						BuiltinIP current2 = enumerator2.get_Current();
						if (!current2.IsInitialized)
						{
							bool result = false;
							return result;
						}
					}
				}
				return true;
			}
		}
		public override int SerializedSize
		{
			get
			{
				int num = this.memoizedSerializedSize;
				if (num != -1)
				{
					return num;
				}
				num = 0;
				if (this.hasLongConnectIPCount)
				{
					num += CodedOutputStream.ComputeUInt32Size(1, this.LongConnectIPCount);
				}
				if (this.hasShortConnectIPCount)
				{
					num += CodedOutputStream.ComputeUInt32Size(2, this.ShortConnectIPCount);
				}
				if (this.hasSeq)
				{
					num += CodedOutputStream.ComputeUInt32Size(5, this.Seq);
				}
				using (IEnumerator<BuiltinIP> enumerator = this.LongConnectIPListList.GetEnumerator())
				{
					while (enumerator.MoveNext())
					{
						BuiltinIP current = enumerator.get_Current();
						num += CodedOutputStream.ComputeMessageSize(3, current);
					}
				}
				using (IEnumerator<BuiltinIP> enumerator2 = this.ShortConnectIPListList.GetEnumerator())
				{
					while (enumerator2.MoveNext())
					{
						BuiltinIP current2 = enumerator2.get_Current();
						num += CodedOutputStream.ComputeMessageSize(4, current2);
					}
				}
				this.memoizedSerializedSize = num;
				return num;
			}
		}
		private BuiltinIPList()
		{
		}
		public BuiltinIP GetLongConnectIPList(int index)
		{
			return this.longConnectIPList_[index];
		}
		public BuiltinIP GetShortConnectIPList(int index)
		{
			return this.shortConnectIPList_[index];
		}
		public override void WriteTo(ICodedOutputStream output)
		{
			int arg_06_0 = this.SerializedSize;
			string[] builtinIPListFieldNames = BuiltinIPList._builtinIPListFieldNames;
			if (this.hasLongConnectIPCount)
			{
				output.WriteUInt32(1, builtinIPListFieldNames[0], this.LongConnectIPCount);
			}
			if (this.hasShortConnectIPCount)
			{
				output.WriteUInt32(2, builtinIPListFieldNames[3], this.ShortConnectIPCount);
			}
			if (this.longConnectIPList_.Count > 0)
			{
				output.WriteMessageArray<BuiltinIP>(3, builtinIPListFieldNames[1], this.longConnectIPList_);
			}
			if (this.shortConnectIPList_.Count > 0)
			{
				output.WriteMessageArray<BuiltinIP>(4, builtinIPListFieldNames[4], this.shortConnectIPList_);
			}
			if (this.hasSeq)
			{
				output.WriteUInt32(5, builtinIPListFieldNames[2], this.Seq);
			}
		}
		public override int GetHashCode()
		{
			int num = base.GetType().GetHashCode();
			if (this.hasLongConnectIPCount)
			{
				num ^= this.longConnectIPCount_.GetHashCode();
			}
			if (this.hasShortConnectIPCount)
			{
				num ^= this.shortConnectIPCount_.GetHashCode();
			}
			if (this.hasSeq)
			{
				num ^= this.seq_.GetHashCode();
			}
			using (IEnumerator<BuiltinIP> enumerator = this.longConnectIPList_.GetEnumerator())
			{
				while (enumerator.MoveNext())
				{
					BuiltinIP current = enumerator.get_Current();
					num ^= current.GetHashCode();
				}
			}
			using (IEnumerator<BuiltinIP> enumerator2 = this.shortConnectIPList_.GetEnumerator())
			{
				while (enumerator2.MoveNext())
				{
					BuiltinIP current2 = enumerator2.get_Current();
					num ^= current2.GetHashCode();
				}
			}
			return num;
		}
		public override bool Equals(object object_0)
		{
			BuiltinIPList builtinIPList = object_0 as BuiltinIPList;
			if (builtinIPList == null)
			{
				return false;
			}
			if (this.hasLongConnectIPCount != builtinIPList.hasLongConnectIPCount || (this.hasLongConnectIPCount && !this.longConnectIPCount_.Equals(builtinIPList.longConnectIPCount_)))
			{
				return false;
			}
			if (this.hasShortConnectIPCount != builtinIPList.hasShortConnectIPCount || (this.hasShortConnectIPCount && !this.shortConnectIPCount_.Equals(builtinIPList.shortConnectIPCount_)))
			{
				return false;
			}
			if (this.hasSeq != builtinIPList.hasSeq || (this.hasSeq && !this.seq_.Equals(builtinIPList.seq_)))
			{
				return false;
			}
			if (this.longConnectIPList_.Count != builtinIPList.longConnectIPList_.Count)
			{
				return false;
			}
			for (int i = 0; i < this.longConnectIPList_.Count; i++)
			{
				if (!this.longConnectIPList_[i].Equals(builtinIPList.longConnectIPList_[i]))
				{
					return false;
				}
			}
			if (this.shortConnectIPList_.Count != builtinIPList.shortConnectIPList_.Count)
			{
				return false;
			}
			for (int j = 0; j < this.shortConnectIPList_.Count; j++)
			{
				if (!this.shortConnectIPList_[j].Equals(builtinIPList.shortConnectIPList_[j]))
				{
					return false;
				}
			}
			return true;
		}
		public override void PrintTo(TextWriter writer)
		{
			GeneratedMessageLite<BuiltinIPList, BuiltinIPList.Builder>.PrintField("LongConnectIPCount", this.hasLongConnectIPCount, this.longConnectIPCount_, writer);
			GeneratedMessageLite<BuiltinIPList, BuiltinIPList.Builder>.PrintField("ShortConnectIPCount", this.hasShortConnectIPCount, this.shortConnectIPCount_, writer);
			GeneratedMessageLite<BuiltinIPList, BuiltinIPList.Builder>.PrintField<BuiltinIP>("LongConnectIPList", this.longConnectIPList_, writer);
			GeneratedMessageLite<BuiltinIPList, BuiltinIPList.Builder>.PrintField<BuiltinIP>("ShortConnectIPList", this.shortConnectIPList_, writer);
			GeneratedMessageLite<BuiltinIPList, BuiltinIPList.Builder>.PrintField("Seq", this.hasSeq, this.seq_, writer);
		}
		public static BuiltinIPList ParseFrom(byte[] data)
		{
			return BuiltinIPList.CreateBuilder().MergeFrom(data).BuildParsed();
		}
		private BuiltinIPList MakeReadOnly()
		{
			this.longConnectIPList_.MakeReadOnly();
			this.shortConnectIPList_.MakeReadOnly();
			return this;
		}
		public static BuiltinIPList.Builder CreateBuilder()
		{
			return new BuiltinIPList.Builder();
		}
		public override BuiltinIPList.Builder ToBuilder()
		{
			return BuiltinIPList.CreateBuilder(this);
		}
		public override BuiltinIPList.Builder CreateBuilderForType()
		{
			return new BuiltinIPList.Builder();
		}
		public static BuiltinIPList.Builder CreateBuilder(BuiltinIPList prototype)
		{
			return new BuiltinIPList.Builder(prototype);
		}
		static BuiltinIPList()
		{
			BuiltinIPList.defaultInstance = new BuiltinIPList().MakeReadOnly();
			BuiltinIPList._builtinIPListFieldNames = new string[]
			{
				"LongConnectIPCount",
				"LongConnectIPList",
				"Seq",
				"ShortConnectIPCount",
				"ShortConnectIPList"
			};
			BuiltinIPList._builtinIPListFieldTags = new uint[]
			{
				8u,
				26u,
				40u,
				16u,
				34u
			};
			object.ReferenceEquals(micromsg.Proto.BuiltinIPList.Descriptor, null);
		}
	}
}
